Method and apparatus for decoding intra prediction mode

ABSTRACT

A method of decoding an intra prediction mode, can include reconstructing an intra prediction mode group indicator and a prediction mode index, constructing an MPM group including three intra prediction modes using valid intra prediction modes of left and top blocks of the current block, determining an intra prediction mode of the MPM group corresponding to the prediction mode index as the intra prediction mode of the current block when the intra prediction mode group indicator indicates that the intra prediction mode of the current block belongs to the MPM group and determining the intra prediction mode of the current block using the prediction mode index and the three intra prediction modes of the MPM group when the intra prediction mode group indicator indicates that the intra prediction mode of the current block does not belong to the MPM group.

CROSS REFERENCE TO RELATED PATENT APPLICATIONS

This application is a continuation of copending U.S. patent applicationSer. No. 14/638,742 filed on Mar. 4, 2015, which is a continuation ofU.S. patent application Ser. No. 14/124,632 filed on Dec. 6, 2013 (nowU.S. Pat. No. 9,020,031), which is the National Phase of InternationalPatent Application No. PCT/KR2012/003081 filed on Apr. 20, 2012, whichclaims the benefit of Korean Patent Application No. 10-2011-0108448,filed on Oct. 24, 2011. The contents of all of these applications arehereby incorporated by reference as fully set forth herein in theirentirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an intra prediction mode decodingmethod and an intra prediction mode decoding device, and moreparticularly, to a method and a device that generates an MPM group usingintra prediction modes of a left block and a top block of a currentblock and decodes an intra prediction mode using the MPM group, an intraprediction mode group indicator and a prediction mode index.

2. Discussion of the Related Art

Image data has to be encoded to efficiently store or transmit the imagedata. MPEG-1, MPEG-2, MPEG-4, H.264/MPEG-4 AVC (Advanced Video Coding),and the like are known as techniques of encoding image data. In thesetechniques, a picture is divided into macro blocks, it is determinedwhich of intra encoding or inter encoding should be performed in theunit of the macro blocks, and the macro blocks are encoded using thedetermined encoding method.

In H.264 which is a latest image compressing technique, intra predictionis performed to enhance the efficiency of the intra encoding. That is,instead of referring to a reference picture to encode a current block, aprediction block is generated using pixel values spatially neighboringthe current block to be encoded. Specifically, an intra prediction modehaving a small distortion is selected through comparison with anoriginal macro block using the neighboring pixel values and theprediction block of the current block to be encoded is created using theselected intra prediction mode and the neighboring pixel values. Aresidual block including difference signals between the current blockand the prediction block is created and the residual block istransformed, quantized, and entropy-encoded. The intra prediction modeused to create the prediction block is also encoded.

However, in H.264, the intra prediction mode of a current block isencoded regardless of directivity of the intra prediction modes of theleft and top blocks of the current block and there is thus a problem inthat the encoding efficiency is low. When the number of intra predictionmodes increases to enhance the encoding efficiency of a residual block,there is a need for an intra prediction encoding method havingefficiency higher than that of the intra prediction mode encoding methodof H.264 and an intra prediction mode decoding method.

SUMMARY OF THE INVENTION

An object of the invention is to provide a method and a device which canenhance compression efficiency and decompression efficiency of an imageby creating an MPM group using intra prediction modes of left and topblocks of a current block and encoding an intra prediction mode of thecurrent block using the MPM group.

According to an aspect of the invention, there is provided mean intraprediction mode decoding method including; reconstructing an intraprediction mode group indicator and a prediction mode index,constructing an MPM group including three intra prediction modes usingvalid intra prediction modes of left and top blocks of the currentblock, determining an intra prediction mode corresponding to theprediction mode index in the MPM group as the intra prediction mode ofthe current block when the intra prediction mode group indicatorindicates the MPM group, and determining the intra prediction mode ofthe current block using the prediction mode index and intra predictionmodes of the MPM group when the intra prediction mode group indicatordoes not indicate the MPM group. The mode numbers of non-directionalmodes are lower than the mode numbers of directional modes.

In the intra prediction mode decoding method, when only one of the intraprediction modes of the left and top blocks of the current block isvalid, two additional intra prediction modes are included in the MPMgroup, the two additional intra prediction modes are determineddepending on the intra prediction mode. Mode number 0 is assigned to aplanar mode and mode number 1 is assigned to a DC mode.

In the intra prediction mode decoding method, when the intra predictionmodes of the left and top blocks of the current block are all valid, arenot equal to each other and at least one of the intra prediction modesis a non-directional mode, a directional mode is added to the MPM group,and when the intra prediction modes of the left and top blocks of thecurrent block are all valid, are equal to each other and are directionalmodes, two directional intra prediction modes are added to the MPMgroup.

In the image encoding method according to the invention, an intraprediction mode group indicator and a prediction mode index arereconstructed, an MPM group including three intra prediction modes isconstructed using valid intra prediction modes of left and top blocks ofthe current block, an intra prediction mode corresponding to theprediction mode index in the MPM group is determined as the intraprediction mode of the current block when the intra prediction modegroup indicator indicates the MPM group, and the intra prediction modeof the current block is determined using the prediction mode index andintra prediction modes of the MPM group when the intra prediction modegroup indicator does not indicate the MPM group. The mode numbers ofnon-directional modes are lower than the mode numbers of directionalmodes.

Therefore, it is possible to reduce the amount of information forencoding the intra prediction mode of the current block by adding intraprediction modes having higher possibility of being equal to the intraprediction mode of the current block to a first group. Also, it ispossible to reduce the amount of information by assigning lowest modenumbers to the non-directional modes.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a moving image encoding deviceaccording to an embodiment of the invention.

FIG. 2 is a block diagram illustrating a moving image decoding deviceaccording to another embodiment of the invention.

FIG. 3 is a diagram illustrating a method of creating an intraprediction block in the moving image decoding device according to theembodiment of the invention.

FIG. 4 is a conceptual diagram illustrating intra prediction modesaccording to the embodiment of the invention.

FIG. 5 is a diagram illustrating an intra prediction mode encodingsequence according to the embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, various embodiments of the invention will be described indetail with reference to the accompanying drawings. The invention can bemodified in various forms and can have various embodiments. Theembodiments are not intended for limiting the invention, but it shouldbe understood that the invention includes all the modifications,equivalents, and replacements belonging to the spirit and the technicalscope of the invention. In description of the invention with referenceto the drawings, like constituents are referenced by like referencenumerals.

A moving image encoding device and a moving image decoding deviceaccording to the invention may be user terminals such as a personalcomputer, a notebook PC, a personal digital assistant, a portablemultimedia player, a smart phone, a wireless communication terminal, anda TV or servers providing services. The moving image encoding device andthe moving image decoding device may be apparatuses having acommunication device such as a communication modem for communicatingwith various apparatuses or wireless or wired communication networks, amemory storing various programs and data for encoding and decoding animage, and a microprocessor performing the programs to performoperations and controls.

FIG. 1 is a block diagram illustrating a moving image encoding deviceaccording to an embodiment of the invention.

The moving image encoding device 100 according to the embodiment of theinvention includes an intra prediction module 110, an inter predictionmodule 120, a transform and quantization module 130, an entropy encodingmodule 140, an inverse quantization and inverse transform module 150, apost-processing module 160, a picture buffer 170, a subtraction module190, and an addition module 195.

The intra prediction module 110 creates an intra prediction block usingreconstructed pixels of a picture or slice to which a current blockbelongs. The intra prediction module 110 selects one of a predeterminednumber of intra prediction modes depending on the size of the currentblock to be prediction-encoded and creates a prediction block using theselected intra prediction mode.

The inter prediction module 120 performs a motion estimation operationusing reference pictures stored in the picture buffer 170 and determinesreference picture indices and motion vectors for the motion estimationoperation. Then, the inter prediction module 120 creates an interprediction block of the current block using the reference pictureindices and the motion vectors.

The transform and quantization module 130 transforms and quantizes aresidual block of the prediction block created by the intra predictionmodule 110 or the inter prediction module 120. The transform isperformed using one-dimensional transform matrixes in the horizontal andvertical directions. The residual block for intra prediction istransformed using transform matrixes determined depending on the size ofthe transform block (that is, the size of the residual block) and theintra prediction mode. The residual block for inter prediction istransformed using predetermined transform matrixes.

The transform and quantization module 130 quantizes the transform blockusing a quantization step size. The quantization step size can bechanged by coding units equal to or larger than a predetermined size.

The quantized transform block is supplied to the inverse quantizationand inverse transform module 150 and the entropy encoding module 140.

The inverse quantization and inverse transform module 150 inverselyquantizes the quantized transform block and inversely transform theinversely-quantized transform block to reconstruct the residual block.The addition module adds the residual block reconstructed by the inversequantization and inverse transform module 150 and the prediction blockfrom the intra prediction module 110 or the inter prediction module 120to creates a reconstructed block.

The post-processing module 160 serves to improve image quality of thereconstructed picture and includes a deblocking filter module 161, anoffset module 162, and a loop filter module 163.

The deblocking filter module 161 adaptively applies a deblocking filterto boundaries of the prediction block and the transform block. Theboundaries can be limited to boundaries of 8×8 grids. The deblockingfilter module 161 determines the boundaries to be filtered, determinesboundary strengths thereof, and determines whether the deblocking filtershould be applied to the boundaries when the boundary strength is largerthan 0. When it is determined that the boundaries should be filtered,the deblocking filter module 161 selects a filter to be applied to theboundaries and filters the boundaries with the selected filter.

The offset module 162 determines whether an offset should be applied bypictures or slices so as to reduce the distortion between a pixel in theimage undergoing the deblocking filter module and a correspondingoriginal pixel. Alternatively, a slice is divided into plural offsetareas and the offset type of each offset area can be determined. Theoffset type may include a predetermined number of edge offset types andband offset types. When the offset type is an edge offset type, the edgetype to which each pixel belongs is determined and an offsetcorresponding thereto is applied. The edge type is determined on thebasis of the distribution of two pixel values neighboring a currentpixel.

The loop filter module 163 adaptively loop-filters the reconstructedimage on the basis of the comparison result of the reconstructed imageundergoing the offset module 162 with the original image. It isdetermined whether the reconstructed image should be loop-filtered bycoding units. The size and coefficients of the loop filter to be appliedmay changed by the coding units. Information indicating whether theadaptively loop filter should be applied by coding units may be includedin each slice header. In case of a chroma signal, it can be determinedwhether the adaptive loop filter should be applied by pictures.Therefore, information indicating whether chroma components are filteredmay be included in a slice header or a picture header.

The picture buffer 170 receives post-processed image data from thepost-processing module 160 and reconstructs and stores an image in theunit of pictures. The picture may be an image in the unit of frames oran image in the unit of fields.

The entropy encoding module 140 entropy-encodes the quantizationcoefficient information quantized by the transform and quantizationmodule 130, the intra prediction information received from the intraprediction module 140, the motion information received from the interprediction unit 150, and the like. The entropy encoding module 140includes a scanning module 145 which is used to transform coefficientsof the quantized transform block into one-dimensional quantizationcoefficients.

The scanning module 145 determines a scanning type for transforming thecoefficients of the quantized transform block into one-dimensionalquantization coefficients. The scanning type may vary depending on adirectional intra prediction mode and the size of a transform block. Thequantization coefficients are scanned in the backward direction.

When the quantized transform block is larger than a predetermined size,the transform coefficients are divided into plural sub blocks and arescanned. The scanning types applied to the transform coefficients of thesub blocks are the same. The scanning types applied to the sub blocksmay be a zigzag scan or may be the same scanning types as applied to thetransform coefficients of the sub blocks.

FIG. 2 is a block diagram illustrating a moving image decoding device200 according to an embodiment of the invention.

The moving image decoding device 200 according to the embodiment of theinvention includes an entropy decoding module 210, an inversequantization module 220, an inverse transform module 230, an intraprediction module 240, an inter prediction module 250, a post-processingmodule 260, a picture buffer 270, and an addition module 280.

The entropy decoding module 210 decodes a received bit stream andseparates the bit stream into intra prediction information, interprediction information, quantization coefficient information, and thelike therefrom. The entropy decoding module 210 supplies the decodedintra prediction information to the intra prediction module 240 andsupplies the decoded inter prediction information to the interprediction module 250. The entropy decoding module 210 includes aninverse scanning module 215 for inversely scanning the decodedquantization coefficient information.

The inverse scanning module 215 converts the quantization coefficientinformation into a two-dimensional quantization block. One of pluralscanning types is selected for the conversion. The scanning type mayvary depending on a directional intra prediction mode and the size of atransform block. The quantization coefficients are scanned in thebackward direction. When the quantization transform block is larger thana predetermined size, the coefficients are divided into plural subblocks and are scanned. The scanning types applied to the transformcoefficients of the sub blocks are the same. The scanning types appliedto the sub blocks may be a zigzag scan or may be the same scanning typesas applied to the transform coefficients of the sub blocks.

The inverse quantization module 220 determines a quantization step sizepredictor of a current coding unit and adds the determined quantizationstep size predictor to the received residual quantization step size toreconstruct the quantization step size of the current coding unit. Theinverse quantization module 220 inversely quantizes the quantizationblock using the quantization step size and the inverse quantizationmatrix. The quantization matrix is determined depending on the size ofthe quantization block and the prediction mode. That is, thequantization matrix is selected on the basis of at least one of theprediction mode of the current block and the intra prediction modes forthe quantization block having a predetermined size.

The inverse transform module 230 inversely transforms theinversely-quantized transform block to reconstruct a residual block. Theinverse transform matrix to be applied to the inversely-quantized blockcan be determined depending on the prediction mode and the intraprediction mode.

The addition module 280 adds the prediction block created by the intraprediction module 240 or the inter prediction module 250 to the residualblock reconstructed by the inverse transform module 230 to create areconstructed block.

The intra prediction module 240 reconstructs the intra prediction modeof the current block on the basis of the intra prediction informationreceived from the entropy decoding module 210. Then, the intraprediction module 240 creates a prediction block depending on thereconstructed intra prediction mode.

The inter prediction module 250 reconstructs the reference picture indexand the motion vector on the basis of the inter prediction informationreceived from the entropy decoding module 210. Then, the interprediction module 250 creates a prediction block of the current blockusing the reference picture index and the motion vector. When motioncompensation with decimal prediction is applied, a selectedinterpolation filter is applied to create the prediction block.

The operation of the post-processing module 260 is the same as theoperation of the post-processing module 160 shown in FIG. 1 and thuswill not be described again.

The picture buffer 270 stores the decoded image post-processed by thepost-processing module 260 in the unit of pictures.

FIG. 3 is a diagram illustrating a method of creating an intraprediction block in the moving image decoding device 200 according tothe embodiment of the invention.

First, the entropy decoding module 210 entropy-decodes the intraprediction information from the received bit stream (S110).

The intra prediction information includes the intra prediction modegroup indicator and the prediction mode index. The intra prediction modegroup indicator indicates whether the intra prediction mode of thecurrent block belongs to an MPM group or a group other than the MPMgroup. The prediction mode index is information indicating a specificintra prediction mode in the intra prediction mode group indicated bythe intra prediction mode group indicator.

Then, the intra prediction module 240 creates the MPM group using theintra prediction modes of the blocks neighboring the current block andthen reconstructs the intra prediction mode of the current block (S120).The MPM group includes three intra prediction modes. This will bedescribed with reference to FIG. 4. FIG. 4 is a diagram illustratingintra prediction modes according to an embodiment of the invention.

(1) When the intra prediction modes of the top and left blocks of acurrent block are both present and are different from each other, theMPM group includes the two intra prediction modes and one additionalintra prediction mode.

When one of the two intra prediction modes is a DC mode and the other isnot a planar mode, the additional intra prediction mode may be theplanar mode. Similarly, when one of the two intra prediction modes isthe planar mode and the other is not the DC mode, the additional intraprediction mode may be the DC mode.

When the two intra prediction modes are the DC mode and the planar mode,the additional intra prediction mode may be a vertical mode or ahorizontal mode.

When the two intra prediction modes are not the DC mode nor the planarmode, the additional intra prediction mode may be an intra predictionmode having directionality between the two intra prediction modes, orthe DC mode or the planar mode.

(2) When the intra prediction modes of the top and left blocks of thecurrent block are both present and are equal to each other, the MPMgroup includes the intra prediction mode and two additional intraprediction modes.

When the intra prediction mode is neither the DC mode nor the planarmode, the two additional intra prediction modes are set to two intraprediction modes neighboring the intra prediction mode. When the intraprediction mode is the DC mode, the two additional intra predictionmodes may be the planar mode and the vertical mode.

(3) When only one of the intra prediction modes of the top and leftblocks of the current block is present, the MPM group includes the intraprediction mode and two additional intra prediction modes. The twoadditional intra prediction modes are determined depending on the intraprediction mode.

(4) When the intra prediction modes of the top and left blocks of thecurrent block are not present at all, the MPM group includes the DCmode, the planar mode, and the vertical mode.

When the intra prediction mode group indicator indicates the MPM group,the intra prediction module 240 selects the intra prediction modeindicated by the prediction mode index from the MPM group and determinesthe selected intra prediction mode as the intra prediction mode of thecurrent block. The intra prediction mode group indicator may be flaginformation representing whether the intra prediction mode of thecurrent block belongs to the MPM group or a group other than the MPMgroup.

When the intra prediction mode group indicator does not indicates theMPM group, the intra prediction module 240 determines the intraprediction mode indicated by the prediction mode index out of the intraprediction modes (hereinafter, referred to as residual intra predictionmodes) other than the intra prediction modes belonging to the MPM groupas the intra prediction mode of the current block. The prediction modeindices assigned to the residual intra prediction modes vary dependingon the configuration of the MPM group. That is, the decoded predictionmode indices indicate indices of the residual intra prediction modesrearranged depending on the configuration of the MPM group. Therefore,the intra prediction module 240 selects the intra prediction mode of thecurrent block from the residual intra prediction modes depending on thedecoded prediction mode index and the intra prediction modes belongingto the MPM group.

Specifically, the residual intra prediction modes of the current blockare rearranged in the mode number order and the intra prediction modecorresponding to the received prediction mode index is selected as theintra prediction mode of the current block. In this case, the residualintra prediction modes may be rearranged, but the intra prediction modeof the current block may be determined by comparison of the intraprediction mode numbers belonging to the MPM group with the intraprediction mode index of the current block.

This method can be applied to a case where mode number 2 is assigned tothe DC mode of the non-directional modes, mode number 34 is assigned tothe planar mode, and directional mode numbers are assigned to the othermodes. However, since the probability of selecting the planar mode andthe DC mode as the intra prediction mode of the current block is higherthan those of the other directional modes, a small mode number (forexample, mode number 0) is assigned to the planar mode and theabove-mentioned method can be applied. In this case, the mode numbers ofthe other lower-ranked modes increase by 1.

Alternatively, the lowest indices may be assigned to the non-directionalmodes. For example, when the intra prediction mode of the current blockis the planar mode and the residual intra prediction modes include theplanar mode, the intra prediction mode index may include 0. For example,when the residual intra prediction modes include the planar mode and theDC mode, the intra prediction mode corresponding to the prediction modeindex in a state where the planar mode, the DC mode, and the directionalmodes are arranged in this order may be set as the intra prediction modeof the current block. For example, mode number 0 and mode number 1 maybe assigned to the planar mode the DC mode, respectively, or mode number0 and mode number 1 may be assigned to the DC mode and the planar mode,respectively. In this case, the intra prediction mode index of thecurrent block may be compared with the intra prediction mode numbersbelonging to the MPM group to determine the intra prediction mode of thecurrent block.

The intra prediction module 240 determines the size of the predictionblock using information indicating the transform size of the currentblock (S130).

When the size of the prediction block is equal to the size of thecurrent block, the prediction block is created using the intraprediction mode of the current block and the reference pixels of thecurrent block. The reference pixels are pixels reconstructed or createdpreviously to the current block.

When the size of the prediction block is smaller than the size of thecurrent block, that is, when the current block can be divided intoplural sub blocks and the intra prediction is performed thereon, thesame intra prediction mode (that is, the intra prediction mode of thecurrent block) is used to create the prediction block of each sub block.The prediction blocks of the second sub block or sub blocks subsequentthereto in the decoding order are created using the reconstructed pixelsof the preceding sub blocks. Therefore, after the prediction block, theresidual block, and the reconstructed block are created in the units ofsub blocks, the prediction block of the next sub block is created.

The intra prediction module 240 determines whether the reference pixelsof the block corresponding to the size of the prediction block are allvalid (S140). The reference pixels are pixels which are previouslydecoded and reconstructed. When it is determined that at least one ofthe reference pixels is not valid, the reference pixel are created(S150).

Specifically, when it is determined that the reference pixels are notvalid at all, the reference pixel values are replaced with values of2L−1. Here, L represents the number of bits representing the gray scaleof luma components.

When valid reference pixels are present in only one direction withrespect to the position of the invalid reference pixel, the closestreference pixel out of the valid reference pixels is copied to createthe reference pixels.

When valid reference pixels are present in both directions with respectto the position of the invalid reference pixel, the reference pixellocated at the closest position in a predetermined direction can becopied or two closest reference pixels in both directions can beaveraged to create the reference pixels.

The intra prediction module 240 determines whether the reference pixelsshould be filtered (S160). The reference pixels are adaptively filtereddepending on the reconstructed intra prediction mode and the size of theprediction block (S170).

The intra prediction module 240 does not filter the reference pixelswhen the intra prediction mode is the DC mode. When the intra predictionmodes are the vertical mode and the horizontal mode, the intraprediction module 240 does not also filter the reference pixels.However, when the intra prediction modes are directional modes otherthan the vertical mode and the horizontal mode, the reference pixels areadaptively filtered depending on the intra prediction mode and the sizeof the prediction block. When the size of the prediction block is 4×4,the reference pixels are not filtered for the purpose of a decrease incomplexity regardless of the intra prediction mode. The filtering servesto smooth the variation in pixel value between reference pixels and usesa low-pass filter. The low-pass filter may be [1, 2, 1] which is a 3-tapfilter or [1, 2, 4, 2, 1] which is a 5-tap filter. When the size of theprediction block ranges from 8×8 to 32×32, the reference pixels arefiltered in more intra prediction modes with an increase in the size ofthe prediction block.

The intra prediction module 240 creates the prediction block dependingon the intra prediction mode (S180). The reference pixels used for theprediction block may be pixels which are adaptively filtered dependingon the size of the prediction block and the intra prediction mode.

In the DC mode, the average values of N top reference pixels located atpositions of (x=0, . . . , N−1, y=−1), M left reference pixels locatedat positions of (x=1−, y=0, . . . , M−1), and the corner pixel locatedat a position of (x=−1, y=−1) can be determined as the prediction pixelsof the prediction block. However, the prediction pixels neighboring thereference pixels can be created using weighted average of the averagevalue and the reference pixel neighboring the prediction pixel. In theplanar mode, the prediction pixels can be created in the same was as inthe DC mode.

In the vertical mode, the reference pixels located in the verticaldirection are set to the prediction pixels. However, the predictionpixel neighboring the left reference pixel can be created using thereference pixel located in the vertical direction and the variationbetween the left reference pixels. The variation represents thevariation between the corner reference pixel and the left referencepixel neighboring the prediction pixel. In the horizontal mode, theprediction pixels can be created in the same way as in the verticalmode, except for the direction.

FIG. 5 is a diagram illustrating an intra prediction mode encodingsequence according to an embodiment of the invention. The method ofencoding the intra prediction mode of the current block in the movingimage encoding device shown in FIG. 1 will be described below. Thismethod can be performed by the intra prediction module 110 and theentropy encoding module 140 shown in FIG. 1.

First, the intra prediction mode of the current block is determined(S210).

Then, the MPM group of the current block is created (S220). The methodof creating the MPM group is the same as creating the MPM group in theintra prediction mode 240 shown in FIG. 2 and thus will not bedescribed.

Subsequently, it is determined whether the intra prediction mode of thecurrent block belongs to the MPM group (S230).

When the intra prediction mode belongs to the MPM group, a flag (thatis, the intra prediction mode group indicator) indicating the MPM groupand a prediction mode index indicating a specific intra prediction modein the MPM group are determined (S240).

When the intra prediction mode does not belong to the MPM group, a flagnot indicating the MPM group and the prediction mode index indicatingthe specific intra prediction mode out of intra prediction modes(hereinafter, referred to as residual intra prediction modes) other thanthe intra prediction modes of the MPM group are determined (S250).

The prediction mode index indicating the intra prediction mode of thecurrent block out of the residual intra prediction modes variesdepending on the configuration of the MPM group. That is, the predictionmode indices represent indices of the residual intra prediction modesrearranged depending on the configuration of the MPM group. Therefore,the prediction mode index is determined depending on the intraprediction mode of the current block and the intra prediction modesbelonging to the MPM group.

Specifically, the residual intra prediction modes of the current blockcan be rearranged in the mode number order and the order of the intraprediction mode of the current block can be determined as the predictionmode index. Alternatively, the residual intra prediction modes may berearranged, but the intra prediction mode of the current block may bedetermined by comparison of the intra prediction mode numbers belongingto the MPM group with the intra prediction mode index of the currentblock.

This method can be applied to a case where mode number 2 is assigned tothe DC mode of the non-directional modes, mode number 34 is assigned tothe planar mode, and directional mode numbers are assigned to the othermodes. However, since the probability of selecting the planar mode andthe DC mode as the intra prediction mode of the current is higher thanthose of the other directional modes, a small mode number (for example,mode number 0) is assigned to the planar mode and the above-mentionedmethod can be applied. In this case, the mode numbers of the otherlower-ranked modes increase by 1. Alternatively, the lowest indices maybe assigned to the non-directional modes. For example, when the intraprediction mode of the current block is the planar mode and the residualintra prediction modes include the planar mode, the intra predictionmode index may include 0. For example, when the residual intraprediction modes include the planar mode and the DC mode, the intraprediction mode corresponding to the prediction mode index in a statewhere the planar mode, the DC mode, and the directional modes arearranged in this order may be set as the intra prediction mode of thecurrent block. For example, mode number 0 and mode number 1 may beassigned to the planar mode the DC mode, respectively, or mode number 0and mode number 1 may be assigned to the DC mode and the planar mode,respectively. In this case, the intra prediction mode index of thecurrent block may be compared with the intra prediction mode numbersbelonging to the MPM group to determine the intra prediction mode of thecurrent block.

While the invention has been described with reference to theembodiments, it will be able to be understood by those skilled in theart that the invention can be modified and changed in various formswithout departing from the spirit and scope of the invention describedin the appended claims.

What is claimed is:
 1. A method of decoding an intra prediction mode,comprising: reconstructing an intra prediction mode group indicator anda prediction mode index; constructing an MPM group including three intraprediction modes using valid intra prediction modes of left and topblocks of the current block; determining an intra prediction mode of theMPM group corresponding to the prediction mode index as the intraprediction mode of the current block when the intra prediction modegroup indicator indicates that the intra prediction mode of the currentblock belongs to the MPM group; and determining the intra predictionmode of the current block using the prediction mode index and the threeintra prediction modes of the MPM group when the intra prediction modegroup indicator indicates that the intra prediction mode of the currentblock does not belong to the MPM group; wherein mode numbers of twonon-directional intra prediction modes are lower than mode numbers ofdirectional intra prediction modes, wherein when the intra predictionmodes of the left and top blocks are equal to each other and the intraprediction mode of the left block is one of the two non-directionalintra prediction modes, the MPM group includes the two non-directionalintra prediction modes and a vertical mode, and wherein the twonon-directional intra prediction modes are a planar mode and a DC mode,and mode number 0 is assigned to the planar mode.
 2. The methodaccording to claim 1, wherein when only one of the intra predictionmodes of the left and top blocks of the current block is valid, the MPMgroup includes the valid intra prediction mode and two additional intraprediction modes determined based on the valid intra prediction mode. 3.The method according to claim 1, wherein when the intra prediction modesof the left and top blocks are valid and not equal to each other andonly one of the intra prediction modes of the left and top blocks is anon-directional intra prediction mode, the MPM group includes the twonon-directional intra prediction modes and the directional intraprediction mode.
 4. The method according to claim 1, wherein when theone of two non-directional intra prediction modes is a DC mode, the MPMgroup includes the DC mode, a planar mode and the directional intraprediction mode.